Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: instrument with prometheus #259

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

id
Copy link
Collaborator

@id id commented Sep 5, 2024

No description provided.

@id id force-pushed the 20240905-instrument-with-prometheus branch from f485ea4 to e7c2dd8 Compare September 5, 2024 09:34
README.md Outdated Show resolved Hide resolved
@id id force-pushed the 20240905-instrument-with-prometheus branch 2 times, most recently from 92c2e4c to e65a8fc Compare September 5, 2024 13:32
@id id force-pushed the 20240905-instrument-with-prometheus branch from e65a8fc to 304dd56 Compare September 5, 2024 13:34
Comment on lines +106 to +110
--restapi Enable REST API for monitoring and control.
For now only serves /metrics.
Can be set to IP:Port to listen on a specific IP and Port,
or just Port to listen on all interfaces on
that port. [default: disabled]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--restapi Enable REST API for monitoring and control.
For now only serves /metrics.
Can be set to IP:Port to listen on a specific IP and Port,
or just Port to listen on all interfaces on
that port. [default: disabled]
--restapi Enable REST API for monitoring and control.
Only takes effect if Prometheus is enabled.
For now only serves /metrics.
Can be set to IP:Port to listen on a specific IP and Port,
or just Port to listen on all interfaces on
that port. [default: disabled]

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only takes effect if Prometheus is enabled.

I was thinking to add other functionality later, like change config in runtime without restart. Could be useful if you already have 1M connections and don't want to redo them again.

Comment on lines +1284 to +1300
Counters = [ publish_latency
, recv
, sub
, sub_fail
, pub
, pub_fail
, pub_overrun
, pub_succ
, connect_succ
, connect_fail
, connect_retried
, reconnect_succ
, unreachable
, connection_refused
, connection_timeout
, connection_idle
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe we could move this list of counter names to a counter_name/0 function, and use it both here and in counters/0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in the next PR. There are a few more things to deduplicate.

@id id merged commit 1a9fbd4 into emqx:master Sep 6, 2024
4 checks passed
@id id deleted the 20240905-instrument-with-prometheus branch September 6, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants